package cn.jjxx.shiro.session.core;

import org.apache.shiro.web.servlet.ShiroHttpSession;

/**
 * 一些常量设置
 *@Title ShiroSessionRedisConstant.java
 *@description TODO
 *@time 2020年7月16日 下午12:28:04
 *@author YAOXIONG
 *@version 1.0
 *
 */
public class ShiroSessionRedisConstant {

	/**
	 * 前缀
	 */
	public static final String BASE_PREFIX = "SSO:";
	/**
	 * shirosession存储到redis中key的前缀
	 */
	public static final String SHIROSESSION_REDIS_PREFIX = BASE_PREFIX+"SSO_SHIROSESSION_";
	/**
	 * 子系统操作
	 */
	public static final String SSO_SHIROSESSION_REDIS_PREFIX = BASE_PREFIX+"SHIROSESSION_";
	/**
	 * shirosession存储到redis哪个库中
	 */
	public static final int SHIROSESSION_REDIS_DB = 0;
	/**
	 * shirosession存储到redis中的过期时间
	 */
	public static final int SHIROSESSION_REDIS_EXTIRETIME = 60*60;

	/**
	 * token存到cookie中的key                           
	 */     
	public static final String SSOTOKEN_COOKIE_KEY = BASE_PREFIX+"SSO_"+ShiroHttpSession.DEFAULT_SESSION_ID_NAME;//"SSOTOKENID";
	/**
	 * token存到redis中的key前缀
	 */
	public static final String SSOTOKEN_REDIS_PREFIX = BASE_PREFIX+"SSO_TOKEN_";
	/**
	 * 保存用户ID
	 */
	public static final String USERNAME_ID =BASE_PREFIX+ "SSO_USERNAME_ID_";

	/**
	 * 消息列表KEY
	 */
	public static final String MSG_FINISH_LIST = BASE_PREFIX+ "SSO_MSG_FINISH_LIST_";

	/**
	 * 密码SESSION
	 */
	public static final String PWD_SESSION = BASE_PREFIX+"SSO_PWD_SESSION_";
	/**
	 * 主系统登录记录
	 */
	public static final String MAIN_SYSTEM_TOKEN = BASE_PREFIX+"SSO_JJSSOMAIN_SYSTEM_TOKEN_";

	/**
	 * 扫描二维码登录的二维码的状态
	 */
	public static final String QR_LOGIN_STATUS = BASE_PREFIX + "QR_LOGIN_STATUS_";

	/**
	 * 扫描二维码登录时，得到的userId
	 */
	public static final String QR_LOGIN_USER_ID = BASE_PREFIX + "QR_LOGIN_USER_ID_";
	
	/**
	 * 换回密码验证码
	 */
	public static final String LOGIN_USER_PHONE_PWD = BASE_PREFIX + "LOGIN_USER_PHONE_PWD_";
	/**
	 * 保存手机验证码
	 */
	public static final String LOGIN_PHONE_CHECK = BASE_PREFIX + "LOGIN_PHONE_CHECK_";
	/**
	 * 单点登录获取值
	 */
	public static final String ACCESS_TOKEN_PREFIX = ShiroSessionRedisConstant.BASE_PREFIX + "appkey:";
	/**
	 * 代办缓存值
	 */
	public static final String AUD_MSG_LIST = BASE_PREFIX+ "AUD_MSG_LIST_";
	/**
	 * 已 办缓存值
	 */
	public static final String AUD_MSG_HIS_LIST = BASE_PREFIX + "AUD_MSG_HIS_LIST_";
	/**
	 * 华为推送token缓存
	 */
	public static final String HMS_PUSH_TOKEN = BASE_PREFIX + "PUSH:HMS_PUSH_TOKEN_";
	/**
	 * 华为推送token缓存时间
	 */
	public static final int HMS_PUSH_TOKEN_TIMEOUT = 60*60*24;
	
	/**
	 * REDIS临时值超时值
	 */
	public static final int TIMEOUT_TIME = 1800;

	/**
	 * 交建云首页JSP路径
	 */
	public static final String SSO_INDEX_JSP_PATH = BASE_PREFIX + "INDEX:JSP_PATH_";
}
